import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:window_example/banner/banner.dart';
import 'package:window_example/data/data_list.dart';
import 'package:window_example/drawer/drawer.dart';
import 'package:window_example/tab/tab.dart';
import 'package:window_example/webview/webview_page2.dart';

import 'page_navigation_state.dart';

class PageNavigationCubit extends Cubit<PageNavigationState> {
  PageNavigationCubit() : super(PageNavigationState().init());

  void toWebViewPage() {
    emit(PageNavigationState.content(const WebViewContent()));
  }

  void toBanner() {
    emit(PageNavigationState.content(BannerContent()));
  }

  void toDrawer() {
    emit(PageNavigationState.content(DrawerContent()));
  }

  void toTab() {
    emit(PageNavigationState.content(TabContent()));
  }

  void toDataList() {
    emit(PageNavigationState.content(DataListContent()));
  }
}
